<?php 
	$config = $this->config;
	$status	  = $this->status;
	$message  = null;
	if($status == 1){
		$message = '<div class="ub_message">Dữ liệu đã được cập nhật thành công</div>';
	}elseif($status == "-1"){
		$message = '<div class="ub_message"><span>Config key bị trùng, vui lòng chọn key khác!</span></div>';
	}
	$active = (int)@$config['active'];
?>
<div class='row' id='content-wrapper'>
            <div class='col-xs-12'>
              <div class='row'>
                <div class='col-sm-12'>
                  <div class='page-header'>
                    <h1 class='pull-left'>
                      <i class='icon-edit'></i>
                      <span class="page_title">Thêm mới / Cập nhật cấu hình hệ thống</span>
                    </h1>
                  </div>
                </div>
              </div>
              <div class='row'>
                <div class='col-sm-12'>
                  <div class='box'>
                    <div class='box-header blue-background'>
                      <div class='title'>
                        <div class='icon-edit'></div>
                        Config page
                      </div>
                      <div class='actions'>
                        <a class="btn box-remove btn-xs btn-link" href="#"><i class='icon-remove'></i>
                        </a>
                        <a class="btn box-collapse btn-xs btn-link" href="#"><i></i>
                        </a>
                      </div>
                    </div>
                    <div class='box-content'>
                        <form id="frmUpdate" name="frmUpdate" class="form form-horizontal validate-form" style="margin-bottom: 0;" method="post" action="<?php echo WEB_PATH;?>/administrator/config/update" accept-charset="UTF-8">
						<input type="hidden" id="id" name="id" value="<?php echo $this->id;?>">
						<input type="hidden" id="do" name="do" value="submit" />
                        <input name="authenticity_token" type="hidden" />
                        
                        <div class='form-group'>
                        <label class='col-md-3 control-label' for='config_key'>Config key</label>
                         <div class='col-sm-4 controls'>
                        	<input data-rule-required='true' data-rule-minlength='6' type="text" class='form-control' id="config_key" name="config_key" placeholder='Config key' value="<?php echo @$config['config_key'];?>" />
                        </div>
                      </div>
                      
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='config_value' placeholder='Page URL'>Config value</label>
                        <div class='col-sm-4 controls'>
                        	<input data-rule-required='true' data-rule-minlength='6' class='form-control' type="text" id="config_value" name="config_value" value="<?php echo @$config['config_value'];?>" />
                        </div>
                      </div>
                      
                      <div class='form-group'>
                        <label class='col-md-3 control-label' for='description'>Description</label>
                         <div class='col-sm-4 controls'>
                        	<textarea data-rule-required='true' data-rule-minlength='6' class='form-control' type="text" id="description" name="description"><?php echo @$config['description'];?></textarea>
                        </div>
                      </div>
                      
                      <div class='form-actions form-actions-padding-sm'>
                        <div class='row'>
                          <div class='col-md-9 col-md-offset-3'>
                            <button class='btn btn-primary' type="submit" >
                              <i class='icon-save'></i>
                              Save
                            </button>
                            <a href="<?php echo WEB_PATH.'/administrator/config';?>"><div class='btn'>Cancel</div></a>
                          </div>
                        </div>
                      </div>
                      </form>
                    </div>
                  </div>
                </div>
              </div>
            </div>
</div>